import 'package:flutter/material.dart';
import 'package:flutter_demo/widgets/textWidget.dart';

class MEnsure extends StatelessWidget {
  final List<String> items;
  MEnsure(this.items) : assert(items != null);

  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: const EdgeInsets.only(top: 8.0, bottom: 8.0),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceAround,
        children: items.map((String item) {
          return Row(
            children: <Widget>[
              new Icon(Icons.check_circle, color: Colors.red, size: 18.0),
              new Padding(padding: EdgeInsets.only(left: 5.0)),
              new MText(item, color: Colors.grey),
            ],
          );
        }).toList(),
      ),
    );
  }
}
